* PAPER TITLE: Patterns of Co-creation in Swiss Local Governance
* AUTHORS: Jörn Ege, Claire Kaiser, Reto Steiner
* JOURNAL: Public Management Review
* Version: 13.05.2025

 
clear
use "ADD_DIRECTORY/data_PMR.dta"

sort cocrindex
list Gemeinde_2023 if cocrindex==9

* install outreg2 for exporting results
ssc install outreg2

* party affiliation
tab polaffc

* Include education of municipal clerk
tab GSB23_Q58
tab GSB23_Q58, nolab miss
generate educ_higher = 0
replace educ_higher = . if GSB23_Q58==.
replace educ_higher = 1 if GSB23_Q58==7 | GSB23_Q58==6 | GSB23_Q58==5
tab educ_higher, miss
sum educ_higher
 
** CO-DESIGN
* run basic ordered logistic model
ologit codesindex ln_netincomepc ln_inhtotal turnoutmex chindex regionalcocrindexnonm lsage genderqmexrs educ_higher
outreg2 using results_revised.doc, replace ctitle(Coefficients) label
* odds ratios
ologit codesindex ln_netincomepc ln_inhtotal turnoutmex chindex regionalcocrindexnonm lsage genderqmexrs educ_higher, or
* include language areas
ologit codesindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
outreg2 using results_revised.doc, append ctitle(Coefficients) label
* odds ratios
ologit codesindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher, or

** CO-DELIVERY
* run basic ordered logistic model
ologit codelindex ln_netincomepc ln_inhtotal turnoutmex chindex regionalcocrindexnonm lsage genderqmexrs educ_higher
outreg2 using results_revised.doc, append ctitle(Coefficients) label
* odds ratios
ologit codelindex ln_netincomepc ln_inhtotal turnoutmex chindex regionalcocrindexnonm lsage genderqmexrs educ_higher, or
* include challenge index and language areas
ologit codelindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
outreg2 using results_revised.doc, append ctitle(Coefficients) label
* odds ratios
ologit codelindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher, or


** CO-ASSESSMENT
* run basic ordered logistic model
ologit coassindex ln_netincomepc ln_inhtotal turnoutmex chindex regionalcocrindexnonm lsage genderqmexrs educ_higher
outreg2 using results_revised.doc, append ctitle(Coefficients) label

* include challenge index and language areas
ologit coassindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
outreg2 using results_revised.doc, append ctitle(Coefficients) label
* odds ratios
ologit coassindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher, or


* ANNEX TABLE A1
ologit codesindex ln_netincomepc ln_inhtotal turnoutmex chindex regionalcocrindexnonm lsage genderqmexrs educ_higher
outreg2 using tablea1.doc, replace ctitle(Ordered Logistic Coefficients) label
ologit codesindex ln_netincomepc ln_inhtotal turnoutmex chindex regionalcocrindexnonm lsage genderqmexrs educ_higher, or
outreg2 using tablea1.doc, append ctitle(Ordered Logistic Odds Ratios) label eform
ologit codesindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
outreg2 using tablea1.doc, append ctitle(Ordered Logistic Odds Ratios) label
ologit codesindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher, or
outreg2 using tablea1.doc, append ctitle(Ordered Logistic Odds Ratios) label eform

* ANNEX TABLE A2
ologit codelindex ln_netincomepc ln_inhtotal turnoutmex chindex regionalcocrindexnonm lsage genderqmexrs educ_higher
outreg2 using tablea2.doc, replace ctitle(Ordered Logistic Coefficients) label
ologit codelindex ln_netincomepc ln_inhtotal turnoutmex chindex regionalcocrindexnonm lsage genderqmexrs educ_higher, or
outreg2 using tablea2.doc, append ctitle(Ordered Logistic Odds Ratios) label eform
ologit codelindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
outreg2 using tablea2.doc, append ctitle(Ordered Logistic Odds Ratios) label
ologit codelindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher, or
outreg2 using tablea2.doc, append ctitle(Ordered Logistic Odds Ratios) label eform

* ANNEX TABLE A3
ziologit codelindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher, inflate (ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher)
outreg2 using tableA3.doc, replace label
ziologit, or
outreg2 using tableA3.doc, append label eform

* ANNEX TABLE A4
ologit coassindex ln_netincomepc ln_inhtotal turnoutmex chindex regionalcocrindexnonm lsage genderqmexrs educ_higher
outreg2 using tablea4.doc, replace ctitle(Ordered Logistic Coefficients) label
ologit coassindex ln_netincomepc ln_inhtotal turnoutmex chindex regionalcocrindexnonm lsage genderqmexrs educ_higher, or
outreg2 using tablea4.doc, append ctitle(Ordered Logistic Odds Ratios) label eform
ologit coassindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
outreg2 using tablea4.doc, append ctitle(Ordered Logistic Odds Ratios) label
ologit coassindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher, or
outreg2 using tablea4.doc, append ctitle(Ordered Logistic Odds Ratios) label eform

* ANNEX TABLE A5
ziologit coassindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher, inflate (ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher)
outreg2 using tableA5.doc, replace label
ziologit, or
outreg2 using tableA5.doc, append label eform

* test proportional odds assumption
ssc install omodel
*ssc install spost13_ado
ssc install oparallel

* omodel test
omodel logit codesindex ln_netincomepc ln_inhtotal turnoutmex chindex langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
* original model
ologit codesindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
* brant test
brant, detail

* omodel test
omodel logit codelindex ln_netincomepc ln_inhtotal turnoutmex chindex langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
* original model
ologit codelindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
* reduced model to run brant test successfully
*ologit codelindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langareaNA regionalcocrindexnonm lsage genderqmexrs educ_higher
* brant test
*brant, detail

* omodel test
omodel logit coassindex ln_netincomepc ln_inhtotal turnoutmex chindex langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
* original model
ologit coassindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
* reduced model to run brant test successfully
*ologit coassindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langareaNA regionalcocrindexnonm lsage genderqmexrs educ_higher
* brant test
*brant, detail

* correlation matrix
asdoc pwcorr codesindex codelindex coassindex netincomepc inhtotal turnoutmex chindex regionalcocrindexnonm lsage genderqmexrs educ_higher, star(all) replace
asdoc cor codesindex codelindex coassindex netincomepc inhtotal turnoutmex chindex regionalcocrindexnonm lsage genderqmexrs educ_higher, append


* predicted probability plots
* last regression
ologit codesindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
ologit codelindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher
ologit coassindex ln_netincomepc ln_inhtotal turnoutmex chindex i.langarea regionalcocrindexnonm lsage genderqmexrs educ_higher

* calculate and plot predicted probabilities
set scheme s1mono

margins, at(turnoutmex=(0(10)100))
marginsplot, title(Co-Design) name(g40)
marginsplot, title(Co-Delivery) name(g41)
marginsplot, title(Co-Assessment) name(g42)

margins langarea
marginsplot, title(Co-Design) name(g50)
marginsplot, title(Co-Delivery) name(g51)
marginsplot, title(Co-Assessment) name(g52)


*** Datawrapper
* save subset of data for datawrapper
keep gdenr Gemeinde_2023 cocrindex codesindex codelindex coassindex
*export data


